package com.googlecode.messwertepi.services;

import java.util.List;

/**
 * Created by eike on 15.07.14.
 */
public interface PrinterService {

    /**
     * Returns the name of the printer.
     *
     * @return the name of the printer
     */
    public String getPrinterName();

    /**
     * Prints the list of data.
     * This method sould block, until the print job has been completed.
     *
     * @param rows the list of date to print
     * @throws com.googlecode.messwertepi.services.PrinterService.PrinterServiceException if the data could not be printed
     */
    public void print(List<String> rows) throws PrinterServiceException;

    public static class PrinterServiceException extends RuntimeException {
        public PrinterServiceException(String message) {
            super(message);
        }

        public PrinterServiceException(String message, Throwable cause) {
            super(message, cause);
        }
    }

}
